const crypto = require('crypto')
const secretKey = 'Wddsade_./123'
// 1. md5 封装一个生成加密的函数

const md5 = (pwd) => {
  return crypto.createHash('md5').update(pwd).digest('hex')
}
// 2. 加强密钥函数
const getPassword = (pwd) => {
  return md5(`pwd=${pwd}_secretKey=${secretKey}`)
}

// let it = getPassword('123')
// console.log(it)

module.exports = { getPassword }
